<template>
  <div class="w-[1100px] h-[1200px] p-20 relative flex flex-col">
    <div class="flex-1">
      <div class="flex justify-between items-center pl-[33%]">
        <div class="text-center font-semibold text-4xl flex-1">{{ printObj.hisname }}</div>
      </div>
      <div class="flex justify-between items-center px-20 mt-8">
        <div class="flex justify-center items-center" style="border: 2px solid #000">丨丨丨丨条形码丨丨丨丨丨</div>
        <div class="text-lg">检查申请单</div>
        <div>
          <div>打印： {{ printObj.dysj }}</div>
          <div class="flex items-end mt-5">
            编号：
            <div class="w-40">{{ printObj.jzbh }}</div>
          </div>
        </div>
      </div>
      <div class="flex justify-between items-center px-20 mt-4">
        <div class="flex-1 text-lg">姓名： {{ printObj.brName }}</div>
        <div class="flex-1 text-lg">{{ printObj.brXb }}</div>

        <div class="flex-1 text-lg">{{ printObj.brAge }} 岁</div>
        <div class="flex-1 text-lg">{{ printObj.brMob }}</div>
      </div>
      <div class="flex justify-between items-center px-20 mt-4">
        <div class="pr-2 flex items-center">
          卡号：
          <div class="w-40" style="border-bottom: 1px solid #000">{{ printObj.brBlkh }}</div>
        </div>
        <div class="flex items-end">
          就诊号：
          <div class="w-40" style="border-bottom: 1px solid #000">{{ printObj.brBlkh }}</div>
        </div>
      </div>
      <div class="flex justify-between items-center px-20 mt-4">
        <div class="pr-2 flex items-center">
          检查地点：
          <div class="w-40" style="border-bottom: 1px solid #000">{{ printObj.jcdd }}</div>
        </div>
        <div class="flex items-end">
          病区床位：
          <div class="w-40" style="border-bottom: 1px solid #000">{{ printObj.cwh }}</div>
        </div>
      </div>
      <div class="flex justify-between items-center px-20 mt-4">
        <div class="pr-2 flex items-center">
          科室：
          <div class="w-40" style="border-bottom: 1px solid #000">{{ printObj.ksmc }}</div>
        </div>
        <div class="flex items-end">
          申请医生：
          <div class="w-40" style="border-bottom: 1px solid #000">{{ printObj.ysmc }}</div>
        </div>
      </div>
      <div class="flex justify-between items-center px-20 mt-4">
        <div class="flex items-end">
          诊断：
          <div class="w-40" style="border-bottom: 1px solid #000">{{ printObj.cbzd }}</div>
        </div>
        <div class="flex items-end">
          申请日期：
          <div class="w-40" style="border-bottom: 1px solid #000">{{ printObj.sqrq }}</div>
        </div>
      </div>
      <div class="flex justify-between items-center px-20 mt-4">
        <div class="flex items-end w-full">
          检查部位：
          <div class="flex-1" style="border-bottom: 1px solid #000">{{ printObj.zyzd }}</div>
        </div>
      </div>
      <div class="flex justify-between items-center px-20 mt-4">
        <div class="flex items-end w-full">
          检查子类：
          <div class="flex-1" style="border-bottom: 1px solid #000">{{ printObj.jczl }}</div>
        </div>
      </div>
      <div class="text-2xl font-bold px-20 mt-2">Rp</div>
    </div>
  </div>
</template>

<script setup>
import { watch } from 'vue'

const printObj = ref({})

const props = defineProps({
  printData: {
    type: Array,
    default: () => []
  }
})
watch(
  () => props.printData,
  () => {
    if (props.printData.printData?.detail[0]) {
      printObj.value = props.printData.printData?.detail[0]
    } else {
      printObj.value = {}
    }
  }
)
</script>
<style lang="less" scoped></style>
